﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xant.FlowEngine.Core;

namespace Xant.FlowEngine.Interface
{
    public interface ISerializer
    {
        T Load<T>(IDbConnection conn, int id, ref bool handled) where T : AbstractFlowObject;

        void Insert<T>(IDbTransaction trans, T item, ref bool handled) where T : AbstractFlowObject;

        void Update<T>(IDbTransaction trans, T item, ref bool handled) where T : AbstractFlowObject;

        void Delete<T>(IDbTransaction trans, T item, ref bool handled) where T : AbstractFlowObject;

        void DeleteById<T>(IDbTransaction trans, int id, ref bool handled) where T : AbstractFlowObject;
    }

}
